A portion of the disclosure of this patent document contains material which is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone in the patent disclosure, as it appears in the Patent and Trademark Office patent files or records, but otherwise reserves all copyright rights whatsoever.
1. Field of the Present Invention
The present invention is related to xe2x80x9ctracexe2x80x9d and debugging capability in the operation of the Java utility program. It represents a means to execute a program in such a way that the sequence of statements being executed can be observed. It is related to xe2x80x9cdebuggerxe2x80x9d, which is a program designed to aid in debugging another program by allowing the programmer to step through the program, examine the data and monitor conditions, such as the values of the variables, and identify problem errors.
2. History of Related Art
It is helpful to describe the software test process to demonstrate the utility of the current invention. A (xe2x80x9cGenericxe2x80x9d process for software testing would be as follows. After software is designed and written, it is unit tested, functionally tested, system tested and then released as a product. During the various test phases, testers execute the program as a normal user might do. If errors are encountered the program can be executed in a controlled xe2x80x9cdebugxe2x80x9d environment. Debug environments are external to and distinct from the program being tested. Although quite useful, they are complicated and require a level of experience and skill to operate effectively. Within debug environments, the program under test can be suspended at definable points and it""s state inspected to determine if it is executing as designed. For example, if a program is to create temporary files at some point during it""s execution, the program can be suspended at an appropriate point and the tester can determine if the temporary files exist and are in the correct format.
After a software product is released for sale, there are invariably still some, to a lesser or greater degree, defects present in the product. Consumer support personnel, employed by the software development companies, are responsible for determining the cause of program malfunctions based on customer input after the product is in the hands of the customer. At customer sites, when program defects arise, there is almost never the skill or a debug environment available to help diagnose malfunctions. Customer support personnel must attempt to diagnose malfunctions with a minimum of diagnostic information. This is a very serious problem facing software development firms in today""s computer marketplace.
It would therefore be a distinct advantage to have a method and system that would overcome the many problems enumerated above. The present invention provides such a method and apparatus.
Before going into the details of the present invention, it might be appropriate to define certain terms which are used in the description of the system.
Java, well established in the late 1990s, is an object oriented programming language developed by Sun Microsystems, Inc. While Java is similar to C++, Java is smaller, more portable and easier to use than C++. This is because it is more robust and it manages memory on its own.
Java was designed to be secure and platform neutral. In other words, it can be run on any platform since Java programs are complied into byte codes, which are similar to machine code and are not specific to any platform.
The term xe2x80x9ctracexe2x80x9d can be defined as a means to execute a program in such a way that the sequence of statements being executed can be observed. This is related to xe2x80x9cdebuggerxe2x80x9d, which is a program designed to aid in debugging another program by allowing the programmer to step through the program, examine the data and monitor conditions such as the values of the variables.
The term xe2x80x9cdebugxe2x80x9d means to detect, locate and correct logical or syntactical errors in a program or malfunctions in hardware. In a hardware context, the term troubleshoot is the term more often used, especially when a problem is a major one.
The preferred embodiment of the present invention is an Execution Trace Facility that is written in 100% Java and provides execution tracing capability. This capability makes available the Java Package name, Class name, Method name and source code line number of the line of code in the Java class from which the trace facility was called. In other words, it makes available all pertinent data required to trace program execution flow. This facility is useful for program problem identification and resolution. It provides detailed process execution trace information that, when analyzed, can identify the source of program errors. It is easily incorporated into releasable product code in a disabled mode. In this mode there is no end user awareness of it""s presence. If a program error occurs, the facility can be enabled and valuable trace information generated. One significant attribute of the present invention is that no additional debugging environment above and beyond the program itself is required to generate the program execution trace.
A call to the Execution Trace Facility is inserted into the code of the program to be tested at various strategic locations, usually as the first line of each method and the program is recompiled. The program is then used in a normal operating environment. If during normal execution a program malfunction occurs, the Execution Trace Facility can be enabled and the program restarted. Execution trace information is then generated, which facilitates error detection.